package it.xiuxian.personcenter.activity

import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.zzhoujay.richtext.RichText
import it.xiuxian.lib.base.ArouterAddress
import it.xiuxian.lib.base.BaseActivity
import it.xiuxian.personcenter.R
import it.xiuxian.personcenter.bean.GongGaoSetailBean
import it.xiuxian.personcenter.databinding.ActivityGonggaoDetailBinding
import it.xiuxian.personcenter.presenter.GongGaoDetailActivityPresenter
@Route(path = ArouterAddress.GONGGAODETAILACTIVITY)
class GongGaoDetailActivity:BaseActivity<GongGaoDetailActivityPresenter>() {
    @JvmField
    @Autowired
    var id:String?=null
   lateinit var binding:ActivityGonggaoDetailBinding
    override val layoutId: Int
        get() = R.layout.activity_gonggao_detail
    override val presenter: GongGaoDetailActivityPresenter
        get() = GongGaoDetailActivityPresenter()

    override fun initView() {
       // super.initView()
        ARouter.getInstance().inject(this)
       binding=  getViewDataBinding<ActivityGonggaoDetailBinding>()
        mPresenter!!.getDetail(id!!)


    }

    fun geData(data: GongGaoSetailBean) {
        binding.include.tvTitle.text = data.biaoti
        RichText.from(data.message).into(binding.tvContent)
    }
}